Optimal. Leaf size=138 \[ -\frac{\left (6 a^2+b^2\right ) \sin ^7(c+d x)}{42 d}+\frac{\left (6 a^2+b^2\right ) \sin ^5(c+d x)}{10 d}-\frac{\left (6 a^2+b^2\right ) \sin ^3(c+d x)}{6 d}+\frac{\left (6 a^2+b^2\right ) \sin (c+d x)}{6 d}-\frac{5 a b \cos ^7(c+d x)}{42 d}-\frac{b \cos ^7(c+d x) (a+b \tan (c+d x))}{6 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.107396, antiderivative size = 138, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {3508, 3486, 2633} \[ -\frac{\left (6 a^2+b^2\right ) \sin ^7(c+d x)}{42 d}+\frac{\left (6 a^2+b^2\right ) \sin ^5(c+d x)}{10 d}-\frac{\left (6 a^2+b^2\right ) \sin ^3(c+d x)}{6 d}+\frac{\left (6 a^2+b^2\right ) \sin (c+d x)}{6 d}-\frac{5 a b \cos ^7(c+d x)}{42 d}-\frac{b \cos ^7(c+d x) (a+b \tan (c+d x))}{6 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3508
Rule 3486
Rule 2633
Rubi steps
\begin{align*} \int \cos ^7(c+d x) (a+b \tan (c+d x))^2 \, dx &=-\frac{b \cos ^7(c+d x) (a+b \tan (c+d x))}{6 d}-\frac{1}{6} \int \cos ^7(c+d x) \left (-6 a^2-b^2-5 a b \tan (c+d x)\right ) \, dx\\ &=-\frac{5 a b \cos ^7(c+d x)}{42 d}-\frac{b \cos ^7(c+d x) (a+b \tan (c+d x))}{6 d}-\frac{1}{6} \left (-6 a^2-b^2\right ) \int \cos ^7(c+d x) \, dx\\ &=-\frac{5 a b \cos ^7(c+d x)}{42 d}-\frac{b \cos ^7(c+d x) (a+b \tan (c+d x))}{6 d}-\frac{\left (6 a^2+b^2\right ) \operatorname{Subst}\left (\int \left (1-3 x^2+3 x^4-x^6\right ) \, dx,x,-\sin (c+d x)\right )}{6 d}\\ &=-\frac{5 a b \cos ^7(c+d x)}{42 d}+\frac{\left (6 a^2+b^2\right ) \sin (c+d x)}{6 d}-\frac{\left (6 a^2+b^2\right ) \sin ^3(c+d x)}{6 d}+\frac{\left (6 a^2+b^2\right ) \sin ^5(c+d x)}{10 d}-\frac{\left (6 a^2+b^2\right ) \sin ^7(c+d x)}{42 d}-\frac{b \cos ^7(c+d x) (a+b \tan (c+d x))}{6 d}\\ \end{align*}
Mathematica [A] time = 0.426256, size = 154, normalized size = 1.12 \[ -\frac{-3675 a^2 \sin (c+d x)-735 a^2 \sin (3 (c+d x))-147 a^2 \sin (5 (c+d x))-15 a^2 \sin (7 (c+d x))+1050 a b \cos (c+d x)+630 a b \cos (3 (c+d x))+210 a b \cos (5 (c+d x))+30 a b \cos (7 (c+d x))-525 b^2 \sin (c+d x)+35 b^2 \sin (3 (c+d x))+63 b^2 \sin (5 (c+d x))+15 b^2 \sin (7 (c+d x))}{6720 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.057, size = 108, normalized size = 0.8 \begin{align*}{\frac{1}{d} \left ({b}^{2} \left ( -{\frac{ \left ( \cos \left ( dx+c \right ) \right ) ^{6}\sin \left ( dx+c \right ) }{7}}+{\frac{\sin \left ( dx+c \right ) }{35} \left ({\frac{8}{3}}+ \left ( \cos \left ( dx+c \right ) \right ) ^{4}+{\frac{4\, \left ( \cos \left ( dx+c \right ) \right ) ^{2}}{3}} \right ) } \right ) -{\frac{2\,ab \left ( \cos \left ( dx+c \right ) \right ) ^{7}}{7}}+{\frac{{a}^{2}\sin \left ( dx+c \right ) }{7} \left ({\frac{16}{5}}+ \left ( \cos \left ( dx+c \right ) \right ) ^{6}+{\frac{6\, \left ( \cos \left ( dx+c \right ) \right ) ^{4}}{5}}+{\frac{8\, \left ( \cos \left ( dx+c \right ) \right ) ^{2}}{5}} \right ) } \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.5216, size = 132, normalized size = 0.96 \begin{align*} -\frac{30 \, a b \cos \left (d x + c\right )^{7} + 3 \,{\left (5 \, \sin \left (d x + c\right )^{7} - 21 \, \sin \left (d x + c\right )^{5} + 35 \, \sin \left (d x + c\right )^{3} - 35 \, \sin \left (d x + c\right )\right )} a^{2} -{\left (15 \, \sin \left (d x + c\right )^{7} - 42 \, \sin \left (d x + c\right )^{5} + 35 \, \sin \left (d x + c\right )^{3}\right )} b^{2}}{105 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.93409, size = 221, normalized size = 1.6 \begin{align*} -\frac{30 \, a b \cos \left (d x + c\right )^{7} -{\left (15 \,{\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{6} + 3 \,{\left (6 \, a^{2} + b^{2}\right )} \cos \left (d x + c\right )^{4} + 4 \,{\left (6 \, a^{2} + b^{2}\right )} \cos \left (d x + c\right )^{2} + 48 \, a^{2} + 8 \, b^{2}\right )} \sin \left (d x + c\right )}{105 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: NotImplementedError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]